ruby:
  releases = @release.channel.recently_releases

- if releases.size > 0
  .card
    .card-header
      h3.card-title
        i.fas.fa-history
        |  最近 10 次上传
      .card-tools
        button.btn.btn-tool data-card-widget="collapse"
          i.fas.fa-minus
    .card-body
      .timeline
        - releases.each do |release|
          div
            i.fa-circle class="#{@release == release ? 'fas' : 'far'}"
            .timeline-item
              span.time
                i.fas.fa-clock
                | &nbsp
                = time_ago_in_words(release.created_at)
              h3.timeline-header
                = link_to release.app_name, channel_release_path(@release.channel, release)
                = " 上传了新版本 #{release.release_version} (#{release.build_version})"
              - if release.changelog.present?
                .timeline-body.pb-0
                  = changelog_format release.changelog_list, class: 'mb-0'
              - if release.release_type.present? || release.branch.present? || release.short_git_commit.present?
                .timeline-footer
                  - if release.device
                    small.badge
                      = device_name(release.device)
                  - if release.release_type.present?
                    small.badge
                      = release.release_type
                  - if release.branch.present?
                    small.badge
                      = release.branch
                  - if release.short_git_commit.present?
                    small.badge
                      - if release.channel.git_url.present?
                        = git_commit_url(@release.channel.git_url, @release.git_commit)
                      - else
                        = release.short_git_commit
        div
          i.fas.fa-clock.bg-gray